package com.itany.corejava.day08;

public class Test2 {


    public static void main(String[] args) throws Exception {


//        Person p=new Person();
//        p.setName("abc");
//        p.setAge(21);
//        p.setSex(true);
//
//        Address addr=new Address();
//        addr.setCity("南京市");
//
//        p.setAddress(addr);
//
//
//        System.out.println("p = " + p);
//        System.out.println("addr = " + addr);
//        System.out.println("p.getAddress() = " + p.getAddress());
//
//        Person pcp= (Person) p.clone();
//
//        System.out.println("pcp = " + pcp);
//
//        System.out.println("pcp.getName() = " + pcp.getName());
//        System.out.println("pcp.getAge() = " + pcp.getAge());
//        System.out.println("pcp.isSex() = " + pcp.isSex());
//        System.out.println("pcp.getAddress().getCity() = " + pcp.getAddress().getCity());
//        System.out.println("pcp.getAddress() = " + pcp.getAddress());






//        Person p1=new Person();
//        p1.setId("1");
//        p1.setName("abc");
//        p1.setAge(21);
//
//        Person p2=new Person();
//        p2.setId("1");
//        p2.setSex(false);
//
//        System.out.println("p1 = " + p1);
//        System.out.println("p2 = " + p2);
//
//        System.out.println(p1.equals(p2));





        Person p=new Person();

        System.out.println(p);

        p=null;


        System.gc();
        Runtime.getRuntime().gc();





































    }
}
